﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Media;
using System.Windows;
using System.Windows.Controls;

namespace MT.ControlLibrary.Controls
{
    public class ButtonWithTriangle : Button
    {
        //定义是否展开的依赖属性
        public bool IsExpansion
        {
            get { return (bool)GetValue(IsExpansionProperty); }
            set { SetValue(IsExpansionProperty, value); }
        }

        public static readonly DependencyProperty IsExpansionProperty = DependencyProperty.Register("IsExpansion", typeof(bool), typeof(ButtonWithTriangle), new PropertyMetadata(false));

        static ButtonWithTriangle()
        {
            DefaultStyleKeyProperty.OverrideMetadata(typeof(ButtonWithTriangle), new FrameworkPropertyMetadata(typeof(ButtonWithTriangle)));
        }
    }
}
